package org.boticelli.plugin.twitter;

import java.util.List;
import java.util.Map;

import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthProvider;

import org.apache.http.client.HttpClient;
import org.boticelli.model.TwitterEntry;

/**
 * Quick and dirty twitter API for boticelli
 * 
 * @author shelmberger
 */
public interface TwitterAPI
{
    /**
     * Returns the tweets of the bot and all of its contacts
     * 
     * @param since id to start
     * @return a list of tweets
     */
    List<Map<String, Object>> getFriendsTimeLine(TwitterEntry entry, String since);


    /**
     * Makes the bot tweet the given message.
     * 
     * @param message
     * @return tweet
     */
    Map<String, Object> tweet(TwitterEntry entry, String message);


    /**
     * Deletes the tweet with the given id.
     * 
     * @param id
     * @return
     */
    Map<String, Object> deleteTweet(TwitterEntry entry, String id);


    /**
     * Unfriends the given user.
     * 
     * @param user screen name
     * @return user
     */
    Map<String, Object> unfriend(TwitterEntry entry, String user);


    /**
     * Starts following the given user.
     * 
     * @param user screen name
     * @return user
     */
    Map<String, Object> befriend(TwitterEntry entry, String user);


    /**
     * Returns the current list of people following the bot
     * 
     * @return list of users
     */
    List<String> showFriends(TwitterEntry entry);

    /**
     * Returns <code>true</code> if the twitter API was configured.
     * @return
     */
    boolean isConfigured();
    
    OAuthProvider createOAuthProvider();

    OAuthConsumer createOAuthConsumer();
}
